/**
 * Created by Delicate on 2017/5/31.
 */
//let layer;
//require(["jquery","common","layer"],(a,b,c)=>{
//	layer =c;
//	init();
//    monitor();
//    service();
//})

$(document).ready(function(){
	init();
    monitor();
    service();
});

function init(){
	$(".u-btn-logout").on("click",function(){
		layer.confirm("确定要退出当前系统吗？", {
            btn: ['确定','取消'] //按钮
        }, function(){
        	location.href=contextPath+'/logout'
        },function(){
        	layer.close();
        });
//		var result = confirm("确定要退出当前系统吗？");
//		if(result){
//			location.href=contextPath+'/logout'
//		}
    });
}

function showMsg(){
	var msg = $("#msg").val();
	layer.alert(msg);
}

function monitor(){
    $(".u-switch").on("click",function (){
        $(".g-nav").toggleClass("g-nav-hide");
    })
    $(".g-nav .m-item").on("click",function(){
        $(this).addClass("m-item-active").siblings().removeClass("m-item-active");
        $(".g-article .g-article-iframe").attr("src",$(this).data("href"));
    });
}
function service(){

}

